package Book;

public class BookList {
    private Book[] books = new Book[10];
    private int UseSize;

    public BookList() {
        //错误示范！！这不是c！this.books[0] = {"书1","张答辩","小说",15};
        //错误！！Book[0] books = new Book("书1","张答辩","小说",15);
        this.books[0] = new Book("书1","张答辩","小说",15);
        this.books[1] = new Book("书2","林小大","小说",20);
        this.books[2] = new Book("书3","王尼玛","小说",10);
        this.UseSize = 3;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(Book books,int pos) {
        this.books[pos] = books;
    }

    public int getUseSize() {
        return UseSize;
    }

    public void setUseSize(int useSize) {
        this.UseSize = useSize;
    }
}
